import { createRouter, createWebHistory } from "vue-router";
// import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "home/index",
    },
    {
      path: "/home",
      name: "home",

      component: () => import("@/views/home/index.vue"),
      children: [
        {
          path: "shop",
          name: "shop",
          component: () => import("@/views/home/children/shop.vue"),
        },
        {
          path: "my",
          name: "my",
          component: () => import("@/views/home/children/my.vue"),
        },
        {
          path: "index",
          name: "index",
          component: () => import("@/views/home/children/index.vue"),
        },
        {
          path: "list",
          name: "list",
          component: () => import("@/views/home/children/list.vue"),
        },
      ],
    },
  ],
});

export default router;
